package com.ty.day3;

import java.util.Scanner;

/**
 * Created by IntelliJ IDEA.
 *
 * @author : txy
 * @create 2023/11/8 17:40
 */
public class Task1 {
    public static void main(String[] args) {
        double price, money, receivableMoney, change;
        int count;
        Scanner sc = new Scanner(System.in);
        System.out.print("请输入物品的单价：");
        price = sc.nextDouble();
        System.out.print("请输入物品的数量：");
        count = sc.nextInt();
        System.out.print("请输入收款金额：");
        money = sc.nextDouble();
        receivableMoney = price * count;
        change = money - receivableMoney;
        System.out.println("应收：" + receivableMoney + "￥，收到" + money +
                "￥,找零：" + change+"￥");
    }
}
